﻿$(document).ready(function () {
    //$("#login_btn").mouseover(function(){
    //$("#login_level").slideDown("slow");
    //});
    $("#login_level").mouseleave(function () {
        $(this).fadeOut("normal");
    });
    $("#login_btn").mouseover(function () {//涓婚渶瑕佸湪login.js鏂囦欢涓坊鍔犱簨浠舵敞鍐屽嵆鍙�
        $("#login_level").show("slow");
    });
    $("#login_level").mouseleave(function () {
        $(this).hide("slow");
    });
    $("#usercando_dingzhi").mouseover(function () {
        $("#test").show();
    });
    $("#usercando_dingzhi").mouseleave(function () {
        $("#test").hide();
    });

    $("#login").click(function () {
        var usersEmail = $("#email").val();
        var usersPwd = $("#pwd").val();
        $.get("../ashxfile/Login.ashx", { "usersEmail": usersEmail, "usersPwd": usersPwd }, function (data) {
            if (data == "true") {
                //琛ㄦ槑宸茬粡鐧诲綍鎴愬姛浜�
                //$("#login_btn").html("娆㈣繋鎮細").unbind("mouseover");
                //$("#resign_btn").html(usersEmail);
                //$("#login_btn").attr("display", "none");
                //$("#resign_btn").attr("display", "none");
                $(".loginandresign").hide();
                $("#showusersName").html("娆㈣繋浣狅細" + "<a href='my_order_mydesign.aspx?usersname="+usersEmail+"'>" + usersEmail + "</a>");
            }
            else if (data == "false") {
                window.alert("鐢ㄦ埛鍚嶄笉瀛樺湪鎴栬�瀵嗙爜閿欒锛�");
            }
            else if (data == "error") {
                window.alert("璁块棶鍑虹幇寮傚父锛�");
            }
            //alert(data);
        });
    });
});